import { Application } from 'egg';

export default (app: Application) => {
    const { STRING, CHAR, INTEGER } = app.Sequelize;
    const model = app.model.define('College', {
        college_id: { type: CHAR(32), primaryKey: true },//主键值
        school_id: CHAR(32),//学校id
        college_name: STRING(32),//学院名
        college_status: CHAR(1),//状态（1：启用，2：停用）
        age_limit: INTEGER(5),//年限
        created_by: CHAR(32),//创建人
        updated_by: CHAR(32),//更新人
        is_delete: CHAR(1),//标识是否删除（1：否，2：是）
    }, { tableName: 't_college' });
    return model;
}

export class College {
    college_id: string;
    school_id: string;
    college_name: string;
    college_status: string;
    age_limit: number;
    created_by: string;
    updated_by: string;
    is_delete: string;
}